<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSettingChannelsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('setting_channels', function (Blueprint $table) {
            $table->charset = "utf8";
            $table->collation = "utf8_general_ci";
            $table->comment = "资方列表";
            $table->increments('id');
            $table->string('channel_code',127)->unique()->comment('资方标号');
            $table->string('channel_name',225)->default('')->comment('资方名称');
            $table->string("period_range")->default('')->comment("借款的期限范围");
            $table->unsignedTinyInteger('is_show_plan_table')->default(0)->comment('是否显示还款计划表');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('setting_channels');
    }
}
